package com.gy.education;

import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.widget.ImageView;
import android.widget.TextView;

import com.gy.education.mine.LoginActivity;

/**
 * 作者：gy on 16/7/11
 * 说明：加载页
 */
public class LoadingActivity extends BaseActivity{

    private ImageView img1,img2;
    private TextView tvName;

    @Override
    protected void initView() {
        setContentViewRes(R.layout.activity_loading);
        hidenTop();
        img1 = (ImageView) findViewById(R.id.loading_img1);
        img2 = (ImageView) findViewById(R.id.loading_img2);
        tvName = (TextView) findViewById(R.id.loading_tv);
        handler.sendEmptyMessageDelayed(0,1000);
    }

    @Override
    protected void initData() {

    }

    private Handler handler = new Handler(){
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            Intent intent = new Intent(LoadingActivity.this,LoginActivity.class);
            startActivity(intent);
            LoadingActivity.this.finish();
        }
    };
}
